﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using QDT.Core.Deals;
using QDT.Core.Domain.Enums;
using QDT.Core.Projects;
using QDT.Core.Projects.LoanAlgorithm;

namespace QDT.Web.Admin.Models
{
    public class ProjectModel
    {
        public int Id { get; set; }

        public int LoanId { get; set; }

        [Required(ErrorMessage = "标题是必须的")]
        public string Name { get; set; }

        [Required(ErrorMessage = "子标题是必须的")]
        public string SubName { get; set; }
        
        public decimal BorrowAmount { get; set; }
        
        public decimal MinLoanMoney { get; set; }

        public decimal MaxLoanMoney { get; set; }

        public bool IsOffline { get; set; }

        public bool AssignAble { get; set; }
    }

    public class ProjectDetail {

        public Project Project { get; set; }

        public IList<Credit> Credits { get; set; }

        public ILoanAlgorithm LoanAlgorithm { get; set; }
    }
}